{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>健身房管理系统</title>
    <link rel="stylesheet" href="{% static 'css/input_text.css'%}">
    <link rel="shortcut icon" href="/static/favicon.ico" type="image/x-icon">
</head>

<style>
    .center-form {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100vh; 
        margin: 0;
        padding: 0;
        gap: 10px;
    }
</style>

<style>
    .background{
        flex:1;
    background-image: url('/static/background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    margin: 0;
    padding: 0;
    height: 100vh;
    width: 100vw;
    overflow-y: hidden;
    overflow-x: hidden;
    flex-direction: column;
}
</style>

<style>
    .gradient-text {
        font-size: 50px; /* 设置字体大小 */
        background: linear-gradient(to right, #52E5E7, #130cb7); /* 定义从左到右的红蓝渐变 */
        -webkit-background-clip: text; /* 将背景应用到文本 */
        background-clip: text;
        color: transparent; /* 设置文本颜色为透明，以显示背景渐变 */
        font-weight: bold;
        /* display: inline-block; */
    }
  </style>

<body>  
    <div class="background">
        <div class="audio-control">
            <button id="playPauseBtn" class="audio-btn">
                <svg viewBox="0 0 24 24">
                    <path d="M12 3C7.7 3 3.7 4.4 0 7.7V16.3C3.7 19.6 7.7 21 12 21C16.3 21 20.3 19.6 24 16.3V7.7C20.3 4.4 16.3 3 12 3ZM12 19C8.1 19 4.7 17.5 2 15.1V8.9C4.7 6.5 8.1 5 12 5C15.9 5 19.3 6.5 22 8.9V15.1C19.3 17.5 15.9 19 12 19ZM12 17C13.7 17 15 15.7 15 14C15 12.3 13.7 11 12 11C10.3 11 9 12.3 9 14C9 15.7 10.3 17 12 17Z"></path>
                </svg>
            </button>
        </div>
        <audio id="audio" src="/static/music.mp3" preload="auto"></audio>
        <script>
            document.addEventListener('DOMContentLoaded', function() {
                var playPauseBtn = document.getElementById('playPauseBtn');
                var audio = document.getElementById('audio');
                audio.play();
                playPauseBtn.querySelector('svg').style.fill = '#4CAF50';
                playPauseBtn.addEventListener('click', function() {
                    if (audio.paused) {
                        audio.play();
                        playPauseBtn.querySelector('svg').style.fill = '#4CAF50'; // Change color to indicate playing
                    } else {
                        audio.pause();
                        playPauseBtn.querySelector('svg').style.fill = '#333'; // Reset color
                    }
                });
            });
        </script>
        <h1 class="gradient-text" style = "text-align: center;" >注册</h1>
        <form action="/register_success" method="get" target="_blank" class = 'center-form'>
            <input type="text" name="name" placeholder="请输入名字">

            <select id="option" name="gender">
                <option value="boy">男</option>
                <option value="girl">女</option>
            </select>
            <input type="text" name="age" placeholder="请输入年龄">
            <input type="text" name="contact" placeholder="请输入联系方式">
            <input type="text" name="address" placeholder="请输入地址">
            <input type="text" name="account" placeholder="请输入账户">
            <input type="text" name="password" placeholder="请输入密码">
            <input type="text" name="password_again" placeholder="确认密码">
            <input type="text" id="captcha" name="captcha" required placeholder="验证码">
            <img src="/captcha/" alt="验证码" onclick="this.src='/captcha/?random='+Math.random()">
            <input type="submit" value="注册">
        </form>
    </div>
    
</body>
</html>